/**
 * Created by henian.xu on 2018/8/24.
 *
 */
import Vue from 'vue';

Vue.directive('page-title', (el, binding, vnode) => {
    // 当绑定元素插入到 DOM 中。
    const { value } = binding;
    const { context } = vnode;
    const { _inactive } = context || {};
    // console.log(value, _inactive);
    if (!value || _inactive) return;
    document.title = value;
});
